Skip to main content
Glama

pyResToolbox MCP Server

generate_aquifer_influence

Generate aquifer influence functions for reservoir simulation to quantify water influx from surrounding aquifers into hydrocarbon reservoirs using Van Everdingen & Hurst analytical solutions.

Instructions

Generate Van Everdingen & Hurst aquifer influence functions.

CRITICAL AQUIFER MODELING TOOL - Creates dimensionless aquifer influence functions for AQUTAB keyword in ECLIPSE/Intersect. These functions quantify water influx from surrounding aquifers into hydrocarbon reservoirs.

Parameters:

  • res (float or list, required): Dimensionless aquifer radius (ReD). Must be > 1.0. Can be scalar or list. Typical: 5-100. Example: 10.0. ReD = re/rw where re = aquifer outer radius, rw = reservoir radius.

  • start (float, required): Minimum dimensionless time (tD_min). Must be > 0. Typical: 0.01-1.0. Example: 0.1.

  • end (float, required): Maximum dimensionless time (tD_max). Must be > start. Typical: 10-1000. Example: 100.0.

  • rows (int, required): Number of time points in table. Must be > 0. Typical: 20-100. Example: 50. More rows = smoother curves.

Background: Van Everdingen & Hurst (1949) developed analytical solutions for aquifer influx using diffusivity equation. These functions relate:

  • Dimensionless time (tD) = (k × t) / (φ × μ × ct × rw²)

  • Dimensionless pressure (pD) = aquifer response function

  • Dimensionless radius (ReD) = aquifer geometry

Influence Function: The influence function pD(tD, ReD) represents the dimensionless pressure response at the reservoir-aquifer boundary. It depends on:

  • Aquifer geometry (radial vs linear, finite vs infinite)

  • Boundary conditions (constant rate vs constant pressure)

  • Aquifer properties (permeability, porosity, compressibility)

Applications:

  • Material Balance: Quantify aquifer support in material balance analysis

  • Pressure Maintenance: Evaluate aquifer pressure support

  • Water Influx: Calculate cumulative water influx over time

  • History Matching: Match production history with aquifer model

  • Production Forecasting: Predict future aquifer influx

Integration Method: Uses numerical integration (Gaussian quadrature) of diffusivity equation with high-resolution integration (M=8) for accuracy. The solution is computed at specified dimensionless time points.

Returns: Dictionary with:

  • dimensionless_time (list): Dimensionless time values (tD)

  • dimensionless_pressures (list): List of pD arrays (one per ReD)

  • rows (int): Number of time points

  • dimensionless_radii (list): ReD values used

  • time_range (dict): Start and end dimensionless times

  • note (str): Usage guidance for ECLIPSE

  • inputs (dict): Echo of input parameters

Common Mistakes:

  • ReD < 1.0 (aquifer radius must be > reservoir radius)

  • tD_max < tD_min (end must be > start)

  • Too few rows (<10) causing poor resolution

  • Wrong dimensionless radius (must match aquifer geometry)

  • Confusing dimensionless time with actual time

  • Not accounting for aquifer compressibility

Example Usage:

{ "res": 10.0, "start": 0.1, "end": 100.0, "rows": 50 }

Result: Table with 50 time points from tD=0.1 to tD=100.0 for ReD=10.0.

Note: AQUTAB keyword is ready for direct inclusion in ECLIPSE DATA file. The influence functions are dimensionless and must be scaled using reservoir and aquifer properties. For multiple aquifers, generate separate tables for each aquifer with different ReD values.

Input Schema

NameRequiredDescriptionDefault
requestYes

Input Schema (JSON Schema)

{ "properties": { "request": { "$ref": "#/$defs/InfluenceTableRequest" } }, "required": [ "request" ], "type": "object" }

Implementation Reference

  • Main handler function implementing the generate_aquifer_influence tool using pyrestoolbox.simtools.influence_tables to compute Van Everdingen & Hurst aquifer influence functions.
    def generate_aquifer_influence(request: InfluenceTableRequest) -> dict: """Generate Van Everdingen & Hurst aquifer influence functions. **CRITICAL AQUIFER MODELING TOOL** - Creates dimensionless aquifer influence functions for AQUTAB keyword in ECLIPSE/Intersect. These functions quantify water influx from surrounding aquifers into hydrocarbon reservoirs. **Parameters:** - **res** (float or list, required): Dimensionless aquifer radius (ReD). Must be > 1.0. Can be scalar or list. Typical: 5-100. Example: 10.0. ReD = re/rw where re = aquifer outer radius, rw = reservoir radius. - **start** (float, required): Minimum dimensionless time (tD_min). Must be > 0. Typical: 0.01-1.0. Example: 0.1. - **end** (float, required): Maximum dimensionless time (tD_max). Must be > start. Typical: 10-1000. Example: 100.0. - **rows** (int, required): Number of time points in table. Must be > 0. Typical: 20-100. Example: 50. More rows = smoother curves. **Background:** Van Everdingen & Hurst (1949) developed analytical solutions for aquifer influx using diffusivity equation. These functions relate: - Dimensionless time (tD) = (k × t) / (φ × μ × ct × rw²) - Dimensionless pressure (pD) = aquifer response function - Dimensionless radius (ReD) = aquifer geometry **Influence Function:** The influence function pD(tD, ReD) represents the dimensionless pressure response at the reservoir-aquifer boundary. It depends on: - Aquifer geometry (radial vs linear, finite vs infinite) - Boundary conditions (constant rate vs constant pressure) - Aquifer properties (permeability, porosity, compressibility) **Applications:** - **Material Balance:** Quantify aquifer support in material balance analysis - **Pressure Maintenance:** Evaluate aquifer pressure support - **Water Influx:** Calculate cumulative water influx over time - **History Matching:** Match production history with aquifer model - **Production Forecasting:** Predict future aquifer influx **Integration Method:** Uses numerical integration (Gaussian quadrature) of diffusivity equation with high-resolution integration (M=8) for accuracy. The solution is computed at specified dimensionless time points. **Returns:** Dictionary with: - **dimensionless_time** (list): Dimensionless time values (tD) - **dimensionless_pressures** (list): List of pD arrays (one per ReD) - **rows** (int): Number of time points - **dimensionless_radii** (list): ReD values used - **time_range** (dict): Start and end dimensionless times - **note** (str): Usage guidance for ECLIPSE - **inputs** (dict): Echo of input parameters **Common Mistakes:** - ReD < 1.0 (aquifer radius must be > reservoir radius) - tD_max < tD_min (end must be > start) - Too few rows (<10) causing poor resolution - Wrong dimensionless radius (must match aquifer geometry) - Confusing dimensionless time with actual time - Not accounting for aquifer compressibility **Example Usage:** ```python { "res": 10.0, "start": 0.1, "end": 100.0, "rows": 50 } ``` Result: Table with 50 time points from tD=0.1 to tD=100.0 for ReD=10.0. **Note:** AQUTAB keyword is ready for direct inclusion in ECLIPSE DATA file. The influence functions are dimensionless and must be scaled using reservoir and aquifer properties. For multiple aquifers, generate separate tables for each aquifer with different ReD values. """ # Generate influence table # influence_tables expects ReDs (list of dimensionless radii) ReDs = [request.res] if isinstance(request.res, (int, float)) else request.res result = simtools.influence_tables( ReDs=ReDs, min_td=request.start, max_td=request.end, n_incr=request.rows, M=8, # Integration parameter export=False, ) # influence_tables returns tuple of (tD, list of pD lists) # Convert to DataFrame-like structure and convert mpmath types to float tD, pD_lists = result # Convert mpmath types to regular floats tD_list = [float(t) for t in tD] pD_converted = [ [float(p) for p in pd_array] for pd_array in pD_lists ] return { "dimensionless_time": tD_list, "dimensionless_pressures": pD_converted, "rows": len(tD_list), "dimensionless_radii": [float(r) for r in ReDs], "time_range": {"start": request.start, "end": request.end}, "note": "AQUTAB keyword for ECLIPSE/Intersect - use in DATA file", "inputs": request.model_dump(), }
  • Pydantic schema defining the input parameters for the generate_aquifer_influence tool, including validation and descriptions.
    class InfluenceTableRequest(BaseModel): """Request model for Van Everdingen & Hurst aquifer influence tables.""" model_config = ConfigDict( json_schema_extra={ "example": { "start": 0.01, "end": 1000.0, "rows": 25, "res": 10, "aqunum": 1, "infl": "pot", "ei": True, } } ) start: float = Field(0.01, gt=0, description="Starting dimensionless time") end: float = Field(1000.0, gt=0, description="Ending dimensionless time") rows: int = Field(25, gt=0, le=200, description="Number of table rows") res: int = Field(10, gt=1, le=50, description="Resolution for integration") aqunum: int = Field(1, ge=1, le=10, description="Aquifer number for ECLIPSE") infl: Literal["pot", "press"] = Field( "pot", description="Influence function type (pot or press)") ei: bool = Field(True, description="Use exponential integral") piston: bool = Field(False, description="Piston-like aquifer") td_scale: Optional[float] = Field(None, gt=0, description="Time dimension scaling")
  • Registration of the simtools tools module, which includes the generate_aquifer_influence tool, to the FastMCP server instance.
    from .tools.simtools_tools import register_simtools_tools from .tools.brine_tools import register_brine_tools 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)
  • Function that registers all simtools tools, including generate_aquifer_influence via @mcp.tool() decorator.
    def register_simtools_tools(mcp: FastMCP) -> None: """Register all simulation tools with the MCP server.""" @mcp.tool() def generate_rel_perm_table(request: RelPermTableRequest) -> dict:

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