Skip to main content
Glama
gabrielserrao

pyResToolbox MCP Server

beta_to_lorenz

Convert Dykstra-Parsons beta coefficients to Lorenz coefficients for reservoir heterogeneity analysis, enabling comparison of literature data and reservoir metrics.

Instructions

Convert Dykstra-Parsons beta to Lorenz coefficient.

HETEROGENEITY CONVERSION - Converts beta parameter to Lorenz coefficient. Essential for converting literature data and comparing reservoirs using different heterogeneity metrics.

Parameters:

  • value (float, required): Dykstra-Parsons beta coefficient (0-1). Must be 0 ≤ β ≤ 1. Typical: 0.3-0.8. Example: 0.6 for moderate heterogeneity.

Dykstra-Parsons Beta (β):

  • Permeability variation coefficient (dimensionless, 0-1)

  • β = (k50 - k84.1) / k50

  • Based on log-normal permeability distribution

  • Requires permeability data (core, logs)

  • Common in literature and older studies

Lorenz Coefficient (L):

  • Ranges from 0 (homogeneous) to 1 (completely heterogeneous)

  • Based on cumulative flow capacity vs cumulative storage capacity

  • Directly measurable from production data

  • More intuitive for production analysis

Typical Ranges:

  • β < 0.5: Low heterogeneity (L ~ 0.2-0.3)

  • β = 0.5-0.7: Moderate (L ~ 0.3-0.5)

  • β > 0.7: High heterogeneity (L > 0.5)

Use Cases:

  • Literature Conversion: Convert published beta values to Lorenz

  • Reservoir Comparison: Compare reservoirs using different metrics

  • Simulation Input: Convert beta to Lorenz for simulation models

  • Reservoir Analog Studies: Use analog beta values with Lorenz-based tools

  • Historical Data: Convert old Dykstra-Parsons studies to modern metrics

Returns: Dictionary with:

  • lorenz_coefficient (float): Lorenz coefficient (0-1)

  • beta (float): Input beta coefficient

  • method (str): "Dykstra-Parsons to Lorenz conversion"

  • inputs (dict): Echo of input parameters

Common Mistakes:

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

  • Confusing beta with other variation coefficients

  • Using beta from wrong distribution (must be log-normal)

  • Not understanding that conversion is approximate (depends on distribution)

Example Usage:

{ "value": 0.6 }

Result: L ≈ 0.4-0.5 (moderate heterogeneity).

Note: Conversion assumes log-normal permeability distribution. For non-log-normal distributions, conversion may be less accurate. Always validate against actual production data when possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Implementation Reference

  • The main handler function decorated with @mcp.tool() that performs the beta to Lorenz conversion using the imported layer.lorenzfromb function.
    @mcp.tool() def beta_to_lorenz(request: LorenzRequest) -> dict: """Convert Dykstra-Parsons beta to Lorenz coefficient. **HETEROGENEITY CONVERSION** - Converts beta parameter to Lorenz coefficient. Essential for converting literature data and comparing reservoirs using different heterogeneity metrics. **Parameters:** - **value** (float, required): Dykstra-Parsons beta coefficient (0-1). Must be 0 ≤ β ≤ 1. Typical: 0.3-0.8. Example: 0.6 for moderate heterogeneity. **Dykstra-Parsons Beta (β):** - Permeability variation coefficient (dimensionless, 0-1) - β = (k50 - k84.1) / k50 - Based on log-normal permeability distribution - Requires permeability data (core, logs) - Common in literature and older studies **Lorenz Coefficient (L):** - Ranges from 0 (homogeneous) to 1 (completely heterogeneous) - Based on cumulative flow capacity vs cumulative storage capacity - Directly measurable from production data - More intuitive for production analysis **Typical Ranges:** - β < 0.5: Low heterogeneity (L ~ 0.2-0.3) - β = 0.5-0.7: Moderate (L ~ 0.3-0.5) - β > 0.7: High heterogeneity (L > 0.5) **Use Cases:** - **Literature Conversion:** Convert published beta values to Lorenz - **Reservoir Comparison:** Compare reservoirs using different metrics - **Simulation Input:** Convert beta to Lorenz for simulation models - **Reservoir Analog Studies:** Use analog beta values with Lorenz-based tools - **Historical Data:** Convert old Dykstra-Parsons studies to modern metrics **Returns:** Dictionary with: - **lorenz_coefficient** (float): Lorenz coefficient (0-1) - **beta** (float): Input beta coefficient - **method** (str): "Dykstra-Parsons to Lorenz conversion" - **inputs** (dict): Echo of input parameters **Common Mistakes:** - Beta coefficient outside valid range (must be 0-1) - Confusing beta with other variation coefficients - Using beta from wrong distribution (must be log-normal) - Not understanding that conversion is approximate (depends on distribution) **Example Usage:** ```python { "value": 0.6 } ``` Result: L ≈ 0.4-0.5 (moderate heterogeneity). **Note:** Conversion assumes log-normal permeability distribution. For non-log-normal distributions, conversion may be less accurate. Always validate against actual production data when possible. """ lorenz = layer.lorenzfromb(B=request.value) return { "lorenz_coefficient": float(lorenz), "beta": request.value, "method": "Dykstra-Parsons to Lorenz conversion", "inputs": request.model_dump(), }
  • Pydantic BaseModel defining the input schema for the tool, with a single 'value' field validated between 0 and 1.
    class LorenzRequest(BaseModel): """Request model for Lorenz coefficient calculation.""" value: float = Field(..., ge=0, le=1, description="Lorenz or beta value")
  • Imports and calls register_layer_tools(mcp) to register all layer tools including beta_to_lorenz with the FastMCP server.
    from .tools.layer_tools import register_layer_tools from .tools.library_tools import register_library_tools register_oil_tools(mcp) register_gas_tools(mcp) register_inflow_tools(mcp) register_simtools_tools(mcp) register_brine_tools(mcp) register_layer_tools(mcp)

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