Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

co2_brine_mutual_solubility

Calculate CO2-brine mutual solubilities and properties for sequestration, enhanced oil recovery, and geothermal applications using pressure, temperature, and salinity inputs.

Instructions

Calculate CO2-brine mutual solubilities and properties.

CRITICAL CO2-BRINE SYSTEM TOOL - Computes comprehensive properties for CO2-saturated brine systems using the Duan & Sun (2003) model. Essential for CO2 sequestration, CO2-EOR, and geothermal applications. Accounts for mutual solubility (CO2 in brine, H2O in CO2-rich phase).

Parameters:

  • pres (float, required): Pressure in psia (field) or bar (metric). Must be > 0. Typical: 1000-5000 psia. Example: 3000.0 psia.

  • temp (float, required): Temperature in °F (field) or °C (metric). Typical: 100-400°F. Example: 180.0°F.

  • ppm (float, required): Salinity in parts per million (ppm) NaCl. Typical: 0-200000 ppm. Example: 50000 ppm (5 wt%).

  • metric (bool, optional, default=False): Unit system flag. False = field units (psia, °F), True = metric (bar, °C).

  • cw_sat (bool, optional, default=True): Compressibility calculation flag. True = saturated compressibility, False = undersaturated.

Properties Calculated:

  • Phase Equilibrium:

    • Aqueous phase mole fractions (x_CO2, x_H2O)

    • Vapor phase mole fractions (y_CO2, y_H2O)

    • Salt mole fraction

  • Densities:

    • CO2-rich gas density (gm/cm³)

    • Brine CO2-saturated density (gm/cm³)

    • Brine pure density (gm/cm³)

    • Fresh water density (gm/cm³)

  • Viscosities:

    • Brine CO2-saturated viscosity (cP)

    • Brine pure viscosity (cP)

    • Fresh water viscosity (cP)

  • Formation Volume Factors:

    • Bw CO2-saturated (rb/stb)

    • Bw pure (rb/stb)

    • Bw fresh (rb/stb)

  • Compressibility:

    • Undersaturated compressibility (1/psi or 1/bar)

    • Saturated compressibility (1/psi or 1/bar)

  • Solution GOR: CO2 dissolved in brine (scf/stb or m³/m³)

Mutual Solubility: CO2-brine systems exhibit mutual solubility:

  • CO2 dissolves in brine (increases with pressure, decreases with salinity)

  • H2O dissolves in CO2-rich phase (increases with temperature)

  • Both solubilities depend on pressure, temperature, and salinity

Physics: Uses Duan & Sun (2003) model for CO2-H2O-NaCl systems accounting for:

  • Pressure effects on solubility (higher P = more CO2 dissolved)

  • Temperature effects (higher T = less CO2 dissolved, more H2O in vapor)

  • Salinity effects (higher salinity = less CO2 dissolved)

  • Mutual solubility (both phases contain both components)

Applications:

  • CO2 Sequestration: CCS project design, storage capacity evaluation

  • CO2-EOR: Enhanced oil recovery with CO2 injection, miscibility studies

  • Geothermal: CO2-based geothermal systems, supercritical CO2

  • Aquifer Storage: Underground CO2 storage capacity, leakage assessment

  • Material Balance: CO2-brine material balance calculations

Salinity Conversion:

  • 1 wt% = 10,000 ppm

  • Seawater ≈ 35,000 ppm (3.5 wt%)

  • Formation brine: 50,000-200,000 ppm (5-20 wt%)

Returns: Dictionary with:

  • phase_equilibrium (dict): Mole fractions in aqueous and vapor phases

  • densities (dict): All density values (CO2-rich, saturated, pure, fresh)

  • viscosities (dict): All viscosity values (saturated, pure, fresh)

  • formation_volume_factors (dict): Bw values (saturated, pure, fresh)

  • compressibility (dict): Undersaturated and saturated compressibility

  • solution_gor_co2 (float): CO2 dissolved in brine

  • viscosibility_per_bar_or_psi (float): Viscosibility coefficient

  • method (str): "Duan & Sun (2003) CO2-H2O-NaCl model"

  • units (str): "metric" or "field"

  • note (str): Usage guidance

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Using wrong unit system (check metric flag)

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

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

  • Temperature in wrong units (check metric flag)

  • Not accounting for mutual solubility (both phases contain both components)

  • Using wrong compressibility (saturated vs undersaturated)

Example Usage (Field Units):

{
    "pres": 3000.0,
    "temp": 180.0,
    "ppm": 50000,
    "metric": False,
    "cw_sat": True
}

Result: CO2 solubility in brine ≈ 20-40 scf/stb, H2O in CO2-rich phase ≈ 0.1-1 mol%.

Note: CO2-brine mutual solubility is critical for CCS and CO2-EOR projects. Always use correct unit system (field vs metric). The model accounts for mutual solubility which is significant at high pressures and temperatures. Salinity significantly reduces CO2 solubility - use correct formation water salinity.

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 provided, the description carries the full burden of behavioral disclosure. It thoroughly explains the tool's behavior: it computes comprehensive properties, uses a specific model (Duan & Sun 2003), accounts for mutual solubility, handles unit systems, includes physics effects (pressure, temperature, salinity), and returns a detailed dictionary. It also notes critical applications and common pitfalls, providing rich behavioral context beyond basic functionality.

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?

The description is well-structured with clear sections (Parameters, Properties Calculated, Applications, Returns, Common Mistakes), but it is lengthy with some redundancy (e.g., repeating mutual solubility details). Every sentence adds value, but it could be more front-loaded; the core purpose is stated early, but extensive details follow. It's efficient for a complex tool but slightly verbose.

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 tool's complexity, no annotations, and an output schema (implied by 'Returns' section), the description is highly complete. It covers purpose, parameters, physics, applications, returns, common mistakes, and example usage. The output schema is described in detail in the 'Returns' section, making it fully adequate for an agent to understand and use the tool effectively in context.

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: pres (pressure in psia/bar with typical ranges), temp (temperature in °F/°C with typical ranges), ppm (salinity in ppm with conversion examples), metric (unit system flag), and cw_sat (compressibility calculation flag). Each parameter includes units, constraints, examples, and practical guidance, adding significant meaning beyond the bare schema.

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 CO2-brine mutual solubilities and properties using the Duan & Sun (2003) model, specifying the verb 'calculate' and resource 'CO2-brine mutual solubilities and properties'. It distinguishes from siblings like 'calculate_brine_properties' by focusing specifically on CO2-brine systems with mutual solubility, making it highly specific and differentiated.

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 for CO2 sequestration, CO2-EOR, geothermal applications, aquifer storage, and material balance calculations. It includes a 'Common Mistakes' section with warnings about unit systems, salinity conversion, and compressibility flags, offering clear when-to-use and when-not-to-use advice without naming specific alternatives.

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