Skip to main content
Glama

pyResToolbox MCP Server

oil_sg_from_api

Convert API gravity to specific gravity for oil density calculations using the standard formula SG = 141.5 / (API + 131.5). Essential for petroleum engineering analysis requiring oil density relative to water.

Instructions

Convert API gravity to oil specific gravity.

UNIT CONVERSION TOOL - Converts API gravity (degrees) to specific gravity (dimensionless, water=1.0). Specific gravity is the ratio of oil density to water density at standard conditions. Essential for calculations requiring specific gravity.

Parameters:

  • api (float or list, required): Oil API gravity in degrees. Valid range: 0-100. Typical: 20-50. Example: 35.0 or [30, 35, 40]. Can be scalar or array.

Conversion Formula: SG = 141.5 / (API + 131.5)

Specific Gravity Ranges:

  • Heavy oil: SG > 0.922 (API < 22°)

  • Medium oil: SG 0.850-0.922 (API 22-35°)

  • Light oil: SG < 0.850 (API > 35°)

  • Water: SG = 1.0 (API = 10°)

Returns: Dictionary with:

  • value (float or list): Specific gravity (dimensionless, matches input api shape)

  • method (str): "Standard conversion"

  • units (str): "dimensionless (water=1)"

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Using gas API gravity instead of oil API gravity

  • Confusing API gravity with specific gravity (inverse relationship)

  • Not understanding that lower SG = lighter oil (higher API)

  • Using wrong conversion formula

Example Usage:

{ "api": 35.0 }

Result: SG = 141.5 / (35.0 + 131.5) ≈ 0.850 (medium gravity oil)

Note: Most PVT correlations use API gravity directly, but some require specific gravity. Use this conversion when needed. Remember: API and SG are inversely related - higher API means lower SG (lighter oil).

Input Schema

NameRequiredDescriptionDefault
requestYes

Input Schema (JSON Schema)

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