# Oil analysis

### Request payload

```json
{
    "method": "scalechem.oilAnalysis",
    "params": {
        "chemistryModel": "chem",
        "temperature": {
            "value": 30.0,
            "unit": "°C"
        },
        "pressure": {
            "value": 2.0,
            "unit": "atm"
        },
        "inflows": {
            "unit": "mole %",
            "values": {
                "H2O": 10.0,
                "CO2": 10.0,
                "CH4": 40.0,
                "C4H10": 20.0
            }
        },
        "saturateWithH2O": true
    }
}
```

| **param**       | type                                                                       | description                                                                                              |
| --------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| chemistryModel  | string                                                                     | [chemistry model name](https://devdocs.olisystems.com/oli-scalechem-api/main-methods/..#chemistry-model) |
| temperature     | [valueObject](https://devdocs.olisystems.com/terms-definition#valueobject) | specified temperature with [unit](https://devdocs.olisystems.com/input-unit-set)                         |
| pressure        | [valueObject](https://devdocs.olisystems.com/terms-definition#valueobject) | specified pressure with [unit](https://devdocs.olisystems.com/input-unit-set)                            |
| inflows         | object                                                                     | specified inflow species composition, see [Inflows Input](https://devdocs.olisystems.com/inflows-input)  |
| saturateWithH2O | boolean                                                                    | option to add H2O to saturate the organic liquid phase.                                                  |

{% hint style="info" %}
**params.saturateWithH2O** input is optional. By default, it's set to false.
{% endhint %}

{% hint style="info" %}
In addition to the inputs shown above, some optional properties may also be specified. They can be viewed at [Optional Inputs](https://devdocs.olisystems.com/optional-inputs).
{% endhint %}

### Response (status = PROCESSED)

The output of this calculation is the [stream output ](https://devdocs.olisystems.com/stream-output-json)which is common result output for all OLI's flash calculations or an [error](https://devdocs.olisystems.com/error-output).

### Survey Calculation

Survey calculation is supported for the variables below. Please refer to [Survey calculation](https://devdocs.olisystems.com/survey-calculation) for explained input schema.

| supported **params.surveyInputs\[{}].field** |
| -------------------------------------------- |
| "/params/temperature/value"                  |
| "/params/pressure/value"                     |
| "/params/inflows/values/*\<InflowName>*"     |
