> For the complete documentation index, see [llms.txt](https://devdocs.olisystems.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devdocs.olisystems.com/oli-scalechem-api/main-methods/oil-analysis.md).

# 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](/oli-scalechem-api/main-methods.md#chemistry-model)   |
| temperature     | [valueObject](/terms-definition.md#valueobject) | specified temperature with [unit](/input-unit-set.md)                        |
| pressure        | [valueObject](/terms-definition.md#valueobject) | specified pressure with [unit](/input-unit-set.md)                           |
| inflows         | object                                          | specified inflow species composition, see [Inflows Input](/inflows-input.md) |
| 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](/optional-inputs.md).
{% endhint %}

### Response (status = PROCESSED)

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

### Survey Calculation

Survey calculation is supported for the variables below. Please refer to [Survey calculation](/survey-calculation.md) for explained input schema.

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