Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

flow_fractions_from_lorenz

Generate idealized flow distribution curves from Lorenz coefficients to model reservoir heterogeneity for simulation, waterflood prediction, and sweep efficiency analysis.

Instructions

Generate flow fractions from Lorenz coefficient.

SYNTHETIC FLOW PROFILE - Creates idealized flow distribution matching a specified Lorenz coefficient. Generates a Lorenz curve (cumulative flow vs cumulative capacity) that honors the target heterogeneity level.

Parameters:

  • value (float, required): Target Lorenz coefficient (0-1). Must be 0 ≤ L ≤ 1. Typical: 0.2-0.7. Example: 0.5 for moderate heterogeneity.

Lorenz Curve Generation: Creates a curve showing:

  • X-axis: Cumulative storage capacity (kh fraction)

  • Y-axis: Cumulative flow capacity (flow fraction)

  • Curve shape: Determined by Lorenz coefficient

  • Points: 20 points along the curve for visualization

Curve Behavior:

  • L = 0: Straight diagonal line (perfect conformance)

  • L > 0: Curved line below diagonal (flow imbalance)

  • Higher L: More curvature, greater flow imbalance

Applications:

  • Reservoir Simulation: Generate layer properties for simulation models

  • Waterflood Prediction: Predict sweep efficiency from heterogeneity

  • Sweep Efficiency Estimation: Estimate vertical sweep from Lorenz

  • Sensitivity Analysis: Test impact of heterogeneity on performance

  • Conceptual Models: Create idealized reservoir models for studies

  • Visualization: Plot Lorenz curve to visualize heterogeneity

Returns: Dictionary with:

  • cumulative_flow_capacity (list): Y-axis values (cumulative flow fractions)

  • cumulative_storage_capacity (list): X-axis values (cumulative kh fractions)

  • lorenz_coefficient (float): Target Lorenz coefficient

  • method (str): "Generated Lorenz curve"

  • note (str): Visualization guidance

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • Lorenz coefficient outside valid range (must be 0-1)

  • Confusing cumulative fractions with incremental fractions

  • Not understanding that curve represents idealized distribution

  • Using curve for non-log-normal distributions (may be inaccurate)

Example Usage:

{
    "value": 0.5
}

Result: Lorenz curve with 20 points showing cumulative flow vs cumulative capacity. Curve is below diagonal, indicating flow imbalance (high-k layers produce more than their capacity fraction).

Note: This generates an idealized Lorenz curve. For actual reservoirs, use lorenz_from_flow_fractions with measured production data. The curve assumes log-normal permeability distribution. Plot cumulative flow vs cumulative storage to visualize heterogeneity.

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 full burden and delivers comprehensive behavioral information. It explains what the tool creates (idealized flow distribution, Lorenz curve with 20 points), curve behavior for different L values, assumptions (log-normal permeability distribution), limitations (may be inaccurate for non-log-normal distributions), and detailed return structure. It also warns about common mistakes like invalid coefficient ranges.

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 (SYNTHETIC FLOW PROFILE, Parameters, Lorenz Curve Generation, etc.) and front-loads the core purpose. While comprehensive, some sections like 'Applications' with 6 bullet points could be more concise. However, every sentence adds value and there's no redundant information.

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 (generating mathematical curves with specific behavior), no annotations, and 0% schema coverage, the description provides exceptional completeness. It covers purpose, usage, parameters, behavior, applications, returns, common mistakes, examples, and limitations. The existence of an output schema means the description doesn't need to fully document return values, but it still provides a helpful summary of the return dictionary structure.

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?

With 0% schema description coverage (schema only has 'value' with type/number and min/max constraints), the description fully compensates by providing rich parameter semantics. It explains the parameter is a 'Target Lorenz coefficient (0-1)', provides typical range (0.2-0.7), gives an example (0.5), explains what different values represent (L=0 perfect conformance, L>0 flow imbalance), and shows example usage. This adds substantial 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 clearly states the tool's purpose: 'Generate flow fractions from Lorenz coefficient' and 'Creates idealized flow distribution matching a specified Lorenz coefficient.' It distinguishes from sibling 'lorenz_from_flow_fractions' by specifying this tool generates synthetic data while that tool works with measured data. The verb 'generate' and resource 'flow fractions' are specific and well-defined.

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 versus alternatives. It states: 'For actual reservoirs, use `lorenz_from_flow_fractions` with measured production data' and explains this tool is for generating idealized curves. The 'Applications' section further clarifies appropriate use cases like reservoir simulation, waterflood prediction, and sensitivity analysis.

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