Skip to main content
Glama

pyResToolbox MCP Server

generate_black_oil_table

Generate comprehensive black oil PVT tables for reservoir simulation and analysis, calculating oil properties including solution gas ratio, formation volume factor, viscosity, density, and compressibility across pressure ranges with optional ECLIPSE export.

Instructions

Generate comprehensive black oil PVT table.

COMPREHENSIVE PVT TABLE GENERATOR - Creates complete black oil PVT table with all properties (Rs, Bo, μo, ρo, Co) at pressures from 14.7 psia to specified maximum. This is the most comprehensive PVT tool, generating complete tables for reservoir simulation input or analysis. Optionally exports ECLIPSE-compatible keywords.

Parameters:

  • pi (float, required): Initial reservoir pressure in psia. Must be > 0. Example: 4000.0. Table starts from 14.7 psia and goes up to pmax.

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

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

  • sg_g (float, required): Gas specific gravity (air=1). Valid: 0-3. Typical: 0.6-1.2. Example: 0.68.

  • pmax (float, optional, default=0.0): Maximum pressure for table in psia. If 0, auto-calculates as pi × 1.5. Must be > pi. Example: 5000.0.

  • pb (float, optional, default=0.0): Bubble point pressure in psia. If 0, will be calculated. Example: 3900.0.

  • rsb (float, optional, default=0.0): Solution GOR at bubble point in scf/stb. If 0, will be calculated. Example: 2300.0.

  • nrows (int, optional, default=50): Number of table rows. Valid: 1-200. More rows = finer resolution. Typical: 20-100. Example: 50.

  • export (bool, optional, default=False): Export ECLIPSE-compatible files. If True, creates PVTO.INC, PVDO.INC, DENSITY.INC files. Example: False.

  • pb_method (str, optional, default="VALMC"): Bubble point method. Options: "STAN", "VALMC", "VELAR". VALMC recommended.

  • rs_method (str, optional, default="VELAR"): Solution GOR method. Options: "VELAR", "STAN", "VALMC". VELAR recommended.

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

  • uo_method (str, optional, default="BR"): Oil viscosity method. Only "BR" available.

Generated Properties:

  • Rs: Solution gas-oil ratio (scf/stb) - increases with pressure up to pb

  • Bo: Formation volume factor (rb/stb) - peaks at bubble point

  • μo: Oil viscosity (cP) - minimum at bubble point

  • ρo: Oil density (lb/cuft) - calculated from mass balance

  • Co: Oil compressibility (1/psi) - increases near bubble point

Table Structure: Pressure values are logarithmically spaced from 14.7 psia to pmax, with finer spacing near bubble point for accuracy.

ECLIPSE Export: When export=True, generates:

  • PVTO.INC: Pressure-dependent oil properties (for undersaturated oil)

  • PVDO.INC: Dead oil properties (for heavy oils)

  • DENSITY.INC: Oil density table

Returns: Dictionary with:

  • table (list of dicts): PVT table data, each dict contains pressure and all properties

  • summary (dict): Key values (bubble point, rsb, Bob, μob, etc.)

  • columns (list): Column names in table

  • methods (dict): Methods used for each property

  • export_files (dict, optional): File names if export=True

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Setting pmax too low (should be > pi for complete table)

  • Not providing pb and rsb when known (reduces accuracy)

  • Using wrong correlation methods (use recommended defaults)

  • Too few rows (nrows < 20) causing poor resolution

  • Not understanding table format for simulation input

Example Usage:

{ "pi": 4000.0, "api": 38.0, "degf": 175.0, "sg_g": 0.68, "pmax": 5000.0, "pb": 3900.0, "rsb": 2300.0, "nrows": 50, "export": False, "pb_method": "VALMC", "rs_method": "VELAR", "bo_method": "MCAIN", "uo_method": "BR" }

Result: Complete PVT table with 50 rows covering 14.7-5000 psia with all properties.

Note: This is the most comprehensive PVT tool. Use for complete reservoir analysis or simulation input preparation. Always provide pb and rsb when available for best accuracy. For simulation, set export=True to generate ECLIPSE keywords.

Input Schema

NameRequiredDescriptionDefault
requestYes

Input Schema (JSON Schema)

{ "properties": { "request": { "$ref": "#/$defs/BlackOilTableRequest" } }, "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