Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

gas_critical_properties

Calculate pseudo-critical temperature and pressure for natural gas mixtures to enable accurate Z-factor and gas property computations using industry-standard correlations.

Instructions

Calculate gas pseudo-critical properties (Tc and Pc).

CRITICAL GAS PROPERTY CALCULATION - Computes pseudo-critical temperature and pressure for real gas mixtures. Required for Z-factor calculations and all gas property correlations. Pseudo-critical properties are weighted averages of pure component critical properties, adjusted for non-hydrocarbon components.

Parameters:

  • sg (float, required): Gas specific gravity (air=1.0). Valid: 0.55-3.0. Typical: 0.6-1.2. Example: 0.7 for dry gas.

  • h2s (float, optional, default=0.0): H2S mole fraction (0-1). Typical: 0-0.05. Example: 0.02 for 2% H2S. High H2S significantly affects Tc/Pc.

  • co2 (float, optional, default=0.0): CO2 mole fraction (0-1). Typical: 0-0.20. Example: 0.05 for 5% CO2.

  • n2 (float, optional, default=0.0): N2 mole fraction (0-1). Typical: 0-0.10. Example: 0.01 for 1% N2.

  • method (str, optional, default="PMC"): Correlation method. Options: "PMC", "SUT", "BUR". PMC recommended.

Pseudo-Critical Properties:

  • Tc (Pseudo-critical Temperature): Temperature above which gas cannot be liquefied regardless of pressure. Typical: 300-500°R for natural gas.

  • Pc (Pseudo-critical Pressure): Pressure at critical temperature. Typical: 600-800 psia for natural gas.

Method Selection:

  • PMC (Piper, McCain & Corredor 1993): RECOMMENDED. Most accurate for wide range of gas compositions. Accounts for non-hydrocarbon effects.

  • SUT (Sutton 1985): Classic method. Use for compatibility with older methods.

  • BUR (Burrows 1981): Alternative method. Use for specific applications.

Non-Hydrocarbon Effects:

  • H2S: Increases both Tc and Pc significantly

  • CO2: Increases Tc, decreases Pc slightly

  • N2: Increases Pc, decreases Tc slightly

  • Always account for non-hydrocarbons for accurate Z-factor calculations

Returns: Dictionary with:

  • value (dict): Contains "tc" (degR) and "pc" (psia)

  • method (str): Method used

  • units (dict): {"tc": "degR", "pc": "psia"}

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Not accounting for non-hydrocarbon fractions (H2S, CO2, N2)

  • Using wrong gas gravity (must be separator gas, not sales gas)

  • Confusing pseudo-critical with true critical properties

  • Using critical properties for pure components instead of mixtures

Example Usage:

{
    "sg": 0.7,
    "h2s": 0.0,
    "co2": 0.05,
    "n2": 0.01,
    "method": "PMC"
}

Result: Tc ≈ 380-420°R, Pc ≈ 650-750 psia for typical natural gas.

Note: Critical properties are used internally by gas_z_factor and other gas property tools. Always use PMC method unless specific compatibility required. Account for all non-hydrocarbon components - even small amounts affect results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: it's a calculation tool (non-destructive, read-only implied), explains effects of parameters (e.g., H2S increases Tc/Pc), provides typical ranges and units, and details return structure. It also notes dependencies (used by gas_z_factor) and accuracy considerations (non-hydrocarbon effects).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (Parameters, Pseudo-Critical Properties, Method Selection, etc.), but slightly verbose (e.g., repeating method details). Every sentence adds value (e.g., explaining non-hydrocarbon effects), though it could be more front-loaded; the core purpose is stated early, but some details are deep in the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, 0% schema coverage, and an output schema (which the description aligns with by detailing returns), the description is highly complete: it covers purpose, usage, parameters, behavior, outputs, examples, and common pitfalls. It provides all necessary context for a calculation tool with multiple inputs and specific domain requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates fully: it explains each parameter's purpose (e.g., sg for gas specific gravity), valid ranges, typical values, examples, and impacts on results (e.g., high H2S significantly affects Tc/Pc). It also details method options with recommendations, adding meaning beyond basic schema constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool calculates pseudo-critical temperature and pressure for gas mixtures, specifying it's for real gases and required for Z-factor calculations. It distinguishes from siblings by focusing on gas properties (unlike oil or brine tools) and explicitly mentions it's used internally by gas_z_factor, avoiding overlap.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidelines are provided: use for Z-factor calculations and gas property correlations, with method recommendations (PMC preferred, SUT for compatibility, BUR for specific apps). It warns against common mistakes like not accounting for non-hydrocarbons or using wrong gas gravity, and notes when to use alternatives (e.g., for pure components vs mixtures).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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