Skip to main content
Glama

pyResToolbox MCP Server

oil_formation_volume_factor

Calculate oil formation volume factor (Bo) for reservoir engineering applications. Determines reservoir oil volume relative to surface conditions using API gravity, temperature, pressure, and gas properties for material balance and production forecasting.

Instructions

Calculate oil formation volume factor (Bo).

CRITICAL PVT PROPERTY - Computes ratio of oil volume at reservoir conditions to volume at standard conditions. Bo > 1.0 because oil expands due to dissolved gas and thermal expansion. Essential for material balance, reserve calculations, and production forecasting.

Parameters:

  • api (float, required): Oil API gravity in degrees. Valid: 0-100. Example: 35.0.

  • degf (float, required): Reservoir temperature in °F. Valid: -460 to 1000. Example: 180.0.

  • p (float or list, required): Pressure(s) in psia. Must be > 0. Can be scalar or array. Example: 3000.0 or [2000, 3000, 4000].

  • sg_g (float, optional, default=0.0): Gas specific gravity (air=1). Valid: 0-3. Typical: 0.6-1.2. Example: 0.75.

  • pb (float, optional, default=0.0): Bubble point pressure in psia. Required for accurate calculation. Example: 3500.0.

  • rs (float or list, optional, default=0.0): Solution GOR at pressure p in scf/stb. If 0, will be calculated from p. Must match p shape. Example: 600.0 or [400, 600, 800].

  • rsb (float, optional, default=0.0): Solution GOR at bubble point in scf/stb. Required if pb provided. Example: 800.0.

  • method (str, optional, default="MCAIN"): Correlation method. Options: "MCAIN", "STAN". MCAIN recommended.

Pressure Behavior:

  • p < pb: Bo increases with pressure (more gas dissolves)

  • p = pb: Bo reaches maximum (Bob, typically 1.2-2.0 rb/stb)

  • p > pb: Bo decreases with pressure (oil compressibility dominates)

Method Selection:

  • MCAIN (McCain et al. 1988): Recommended. More accurate, wider range.

  • STAN (Standing 1947): Classic method. Use for compatibility.

Returns: Dictionary with:

  • value (float or list): Bo in rb/stb (matches input p shape)

  • method (str): Method used

  • units (str): "rb/stb"

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Not providing rs when p < pb (will calculate incorrectly)

  • Using separator GOR instead of solution GOR at reservoir pressure

  • Pressure in barg/psig instead of psia

  • Confusing Bo (reservoir volume) with Bg (gas FVF)

Example Usage:

{ "api": 35.0, "degf": 180.0, "p": [2000, 3000, 4000], "sg_g": 0.75, "pb": 3500.0, "rs": [400, 600, 800], "rsb": 800.0, "method": "MCAIN" }

Result: Bo increases from ~1.15 rb/stb at 2000 psia to ~1.35 rb/stb at 3500 psia, then decreases to ~1.33 rb/stb at 4000 psia (above bubble point).

Note: Always provide rs for pressures below bubble point. If rs=0, tool will calculate it, but providing it explicitly improves accuracy.

Input Schema

NameRequiredDescriptionDefault
requestYes

Input Schema (JSON Schema)

{ "properties": { "request": { "$ref": "#/$defs/OilFVFRequest" } }, "required": [ "request" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gabrielserrao/pyrestoolbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server