Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

calculate_brine_properties

Calculate brine properties like density, viscosity, and compressibility for aquifer analysis, water injection, and CO2 sequestration studies using pressure, temperature, and salinity inputs.

Instructions

Calculate properties of CH4 or CO2 saturated brine.

BRINE PVT TOOL - Computes comprehensive brine properties including density, viscosity, compressibility, and formation volume factor. Essential for aquifer analysis, water injection, and CO2 sequestration studies.

Parameters:

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

  • degf (float, required): Temperature in °F. Valid: -460 to 1000. Typical: 100-400°F. Example: 180.0.

  • wt (float, required): Salinity in weight percent NaCl (0-30). Typical: 0-20 wt%. Example: 5.0 for 5% NaCl brine.

  • ch4 (float, optional, default=0.0): CH4 saturation fraction (0-1). Typical: 0-0.1. Example: 0.05 for 5% CH4 saturation.

  • co2 (float, optional, default=0.0): CO2 saturation fraction (0-1). Typical: 0-0.1. Example: 0.03 for 3% CO2 saturation.

Properties Calculated:

  • Density (ρw): Brine density in lb/cuft. Increases with salinity, pressure. Typical: 60-70 lb/cuft.

  • Viscosity (μw): Brine viscosity in cP. Decreases with temperature, increases with salinity. Typical: 0.3-1.5 cP.

  • Compressibility (cw): Brine compressibility in 1/psi. Critical for aquifer influx. Typical: 2e-6 to 5e-6 1/psi.

  • Formation Volume Factor (Bw): Volume ratio rb/stb. Slightly > 1.0. Typical: 1.01-1.05 rb/stb.

  • Solution GOR (Rw): Gas dissolved in brine in scf/stb. Increases with pressure. Typical: 0-20 scf/stb.

Dissolved Gas Effects:

  • CH4-saturated: Methane dissolved in formation water (typical in aquifers)

  • CO2-saturated: CO2 dissolution (sequestration, EOR, geothermal)

  • Mixed systems supported (CH4 + CO2)

  • Dissolved gas reduces density and increases compressibility

Salinity Range: 0-30 wt% NaCl (fresh water to highly saline)

  • Fresh water: 0 wt%

  • Brackish: 0.1-1 wt%

  • Seawater: ~3.5 wt%

  • Formation brine: 5-20 wt%

  • Highly saline: 20-30 wt%

Correlations: Uses industry-standard correlations accounting for:

  • Pressure effects on density and viscosity

  • Temperature effects (viscosity decreases with T)

  • Salinity variations (density and viscosity increase with salinity)

  • Dissolved gas concentrations (reduces density)

Applications:

  • Aquifer Influx: Calculate water influx rates and volumes

  • Water Injection: Design injection projects and pressure maintenance

  • CO2 Sequestration: Evaluate CO2 storage capacity and brine properties

  • Geothermal Reservoirs: Analyze geothermal brine properties

  • Pressure Maintenance: Evaluate aquifer pressure support

  • Material Balance: Include water drive in material balance calculations

Returns: Dictionary with:

  • formation_volume_factor_rb_stb (float or list): Bw (matches input p shape)

  • density_lb_cuft (float or list): Brine density (matches input p shape)

  • viscosity_cp (float or list): Brine viscosity (matches input p shape)

  • compressibility_1_psi (float or list): Brine compressibility (matches input p shape)

  • solution_gor_scf_stb (float or list): Gas dissolved in brine (matches input p shape)

  • method (str): "Industry standard correlations"

  • salinity_wt_percent (float): Input salinity

  • dissolved_gas_saturation (float): Combined CH4+CO2 saturation

  • note (str): Usage guidance

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Using separator temperature instead of reservoir temperature

  • Pressure in barg/psig instead of psia (must be absolute)

  • Salinity in ppm instead of wt% (must convert: wt% = ppm/10000)

  • Not accounting for dissolved gas (affects density and compressibility)

  • Temperature in Celsius instead of Fahrenheit

  • Confusing CH4 and CO2 saturation fractions

Example Usage:

{
    "p": [1000, 2000, 3000],
    "degf": 180.0,
    "wt": 5.0,
    "ch4": 0.05,
    "co2": 0.0
}

Result: Brine density increases with pressure, viscosity decreases with temperature. Dissolved CH4 reduces density compared to pure brine.

Note: Brine properties are critical for accurate aquifer modeling. Always account for dissolved gas (CH4 or CO2) as it significantly affects density and compressibility. Salinity has major impact on density and viscosity - use correct formation water salinity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (computes comprehensive brine properties), mentions it uses industry-standard correlations, and includes practical details like common mistakes (e.g., unit conversions, temperature types) and effects of dissolved gases. However, it lacks explicit information on rate limits, error handling, or computational constraints, which slightly limits transparency.

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

Conciseness3/5

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

The description is well-structured with sections like Parameters, Properties Calculated, Applications, and Returns, but it is overly verbose with redundant details (e.g., extensive lists of properties and applications). Some sentences could be condensed without losing clarity, making it less front-loaded and efficient than ideal for an AI agent.

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 the complexity of the tool (calculating multiple brine properties with gas saturation effects), no annotations, and an output schema that documents return values, the description is highly complete. It covers purpose, parameters, behavior, applications, common mistakes, and example usage, providing all necessary context for an agent to use the tool effectively without relying on structured fields.

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 must fully compensate. It provides detailed parameter semantics beyond the schema, including units (psia, °F, wt%), valid ranges (e.g., p > 0, degf -460 to 1000, wt 0-30), typical values, examples, and explanations of effects (e.g., salinity increases density). This adds significant value over the minimal schema information.

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 explicitly states the tool calculates properties of CH4 or CO2 saturated brine, listing specific properties (density, viscosity, compressibility, formation volume factor) and distinguishing it from sibling tools like 'gas_density' or 'oil_density' by focusing on brine with dissolved gases. It uses clear verbs ('calculate', 'computes') and specifies the resource ('brine properties').

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?

The description provides explicit guidance on when to use this tool, listing applications such as aquifer analysis, water injection, CO2 sequestration, geothermal reservoirs, pressure maintenance, and material balance calculations. It also distinguishes usage from potential alternatives by specifying it's for brine (not gas or oil) and includes dissolved gas effects, with no misleading or contradictory information.

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