# How To Guides

# Inventory Well Prediction

This guide explains the steps required to launch a PetroAI build that makes predictions on inventory wells, including how to prepare the source data and generate the appropriate configuration file.


# Overview

There are two key inputs to the PetroAI inventory well prediction process:

  1. A config file specifying parameters and sensitivity analysis options.
  2. A data source - the INV_well_features table describes the location and landing information for inventory wells.

Predictions are made using trained models specified in the config file, or a model trained in a previous build. Optionally, feature sensitivities can be run to test varying design options.


# 1. Populate the Inventory Wells Source Table

  • Connect to your source database
    Use a database client like DBeaver or MySQL Workbench to connect to your source database. Consult this guide (opens new window) for more information on DBeaver.

  • Generate credentials in PetroAI if needed
    If you don't already have access, you can create credentials in PetroAI:

    • Navigate to the Settings page
    • Click on Database
    • Click New User
    • Create a username and password, and ensure you enable Can Write access
  • Refer to the table schema guide
    Consult this guide (opens new window) for detailed schema definitions and column descriptions to ensure your table is correctly formatted.

  • Ensure clean input data
    The inventory build processes all wells in the source table. If there are old or irrelevant wells you don’t want included, remove them before running the build.


# 2. Generate the Config File

  • Start from a previous build
    Copy a config file from a successful prior inventory build as your starting point and use the code editor to make any modifications if necessary.

  • Ensure required sections are included
    These sections must be present to run inventory predictions and to populate PetroAI Insights dashboards:

    • products: Defines which pipeline components will be run (core1, inv, etc.)
    • phases.shared: Contains global compute parameters (e.g. frac dimensions, well segments, spacing parameters, etc) that will control well feature attribution.
    • phases.product.raw: Optimization parameters for downloading time series data.
    • phases.product.core: Settings related to core1
    • phases.product.feature: Feature experimentation criteria and filters
    • phases.product.model: PDP model prediction settings
    • phases.product.inv: Configuration specific to inventory predictions, as detailed below.
  • Important Notes
    Inventory wells must contain all features expected by the model. If they are missing, you may need to compute or impute them. Common examples include:

    • Proppant concentration (proppant_lb_per_gal)
    • Fluid loading (fluid_gal_per_lb)
    • wellExtras fields

# 3. Save and Launch the Build

  • After making any changes in the code editor, click the Save button, then move to the Compute section to launch the build.

# Inventory Configurations

This section explains how to customize example config files to fit your use case. For more details on each section and supported syntax, refer to the Build Configuration documentation (opens new window).

# Example Inventory Block


 "inv": {
        "include_pdps": false,
        "max_nearby_pdp_distance_miles": 3,
        "valid_pdps_group_name": "empty_group",
        "max_midas_parallelization": 30,
        "num_years_to_forecast": 40,
        "include_timeseries_monthly": true,
        "make_plots": true,
        "inventory_options": {
          "crs_proj4": "+proj=utm +zone=13 +datum=NAD27 +units=m +no_defs"
        },
        "generate_batch_size": 10,
        "partition_options": null,
        "well_features_transformations": [
          {
            "type": "add_uniform_value_column",
            "column_name": "operatorName",
            "column_dtype": "string",
            "column_value": "PetroAI",
            "overwrite": true
          },
          {
            "type": "add_uniform_value_column",
            "column_name": "totalProppantByPerfLength",
            "column_dtype": "float",
            "column_value": 2500,
            "overwrite": true
          },
          {
            "type": "add_uniform_value_column",
            "column_name": "totalFluidByPerfLength",
            "column_dtype": "float",
            "column_value": 2500,
            "overwrite": true
          }
        ],
        "sensitivity_features": {
          "sampled_features": [
            {
              "feature": "totalProppantByPerfLength",
              "low": 1500,
              "high": 3000,
              "step": 500
            }
          ],
          "linked_features": [
            {
              "feature": "totalFluidByPerfLength",
              "value_expr": "row['totalProppantByPerfLength']"
            }
          ]
        }
      }

# Creating New Columns with a Fixed Value

Applies to these phases: grid, grid, pdp2

Sometimes you must add fixed-value columns to meet model expectations. These transformations go in the well_features_transformations section.

For example, filtering for a specific operator's requires adding the operatorName column:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "operatorName",
    "column_dtype": "string",
    "column_value": "PetroAI",
    "overwrite": true
    }
]

Any columns you wish to run sensitivities on should be included in this section, for example proppant per foot:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "string",
    "column_value": "PetroAI",
    "overwrite": true
    }
]

# Running Sensitivities

Applies to these phases: grid, grid, pdp2

Configure the sensitivity_features section to make well predicitions at varying feature values. sensitivity_features has two sections: sampled_features and linked_features.

Sampled Features define the column(s) that you want to vary. Input values for feature (column name), low value, high value, and step size. The feature name must exactly match a column name in the INV_well_features table, either from the core schema or added using well_feature_transformations described above.

Example proppant sensitivity with values 1500, 2000, and 2500 lb/ft:

"sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 1500,
        "high": 3000,
        "step": 500
    }
]

Some features need to be computed dynamically from existing columns using expressions in the linked_features block. linked_features will over-write values generated in the well_features_transformations section.

Example: Linking fluid to proppant.

"linked_features": [
    {
        "feature": "totalFluidByPerfLength",
        "value_expr": "row['totalProppantByPerfLength']"
    }
]

Example: Calculating proppant concentration.

"linked_features": [
    {
        "feature": "prop_conc_lb_gal",
        "value_expr": "row['totalProppantByPerfLength']/row['totalFluidByPerfLength']"
    }
]

# Completion Sensitivities - 1:1 Proppant/Fluid Ratio

Applies to these phases: grid, grid, pdp2

To simulate sensitivities where proppant and fluid are varied together at a 1:1 ratio:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    }
],
"sensitivity_features": {
  "sampled_features": [
    {
      "feature": "totalProppantByPerfLength",
      "low": 2500,
      "high": 3000,
      "step": 500
    }
  ],
  "linked_features": [
    {
      "feature": "totalFluidByPerfLength",
      "value_expr": "row['totalProppantByPerfLength']"
    }
  ]
}

# Completion Sensitivities - Fixed Ratio

Applies to these phases: grid, grid, pdp2

To simulate sensitivities with fixed proppant/fluid ratios:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    }
],
"sensitivity_features": {
    "sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 2000,
        "high": 4000,
        "step": 500
    }
    ],
    "linked_features": [
    {
        "feature": "totalFluidByPerfLength",
        "value_expr": "row['totalProppantByPerfLength'] * 1.2"
    }
    ]
}

# Completion Sensitivities - Varying Ratios

Applies to these phases: grid, grid, pdp2

To simulate sensitivities with varying proppant and proppant/fluid ratios, create variants for both proppant (or fluid), and proppant (or fluid) concentration:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "prop_conc_lb_gal",
    "column_dtype": "float",
    "column_value": 1.0,
    "overwrite": true
    }
],
"sensitivity_features": {
    "sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 2000,
        "high": 3000,
        "step": 500
    },
    {
        "feature": "prop_conc_lb_gal",
        "low": 0.8,
        "high": 1.2,
        "step": 0.1
    }
    ],
    "linked_features": [
    {
        "feature": "totalFluidByPerfLength",
        "value_expr": "row['totalProppantByPerfLength'] / row['prop_conc_lb_gal']"
    }
    ]
}

# Completion Sensitivities - Proppant Concentration Feature

Models will often use a proppant concentration feature. If so, this column can be added as a fixed value as shown above, or computed in the linked_features section. Be sure to use the exact name expected by the model.

Example configuration:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "prop_conc_lb_gal",
    "column_dtype": "float",
    "column_value": 1.0,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    }
],
"sensitivity_features": {
    "sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 2000,
        "high": 3000,
        "step": 500
    },
    {
        "feature": "totalFluidByPerfLength",
        "low": 2000,
        "high": 3000,
        "step": 500
    }
    ],
    "linked_features": [
    {
        "feature": "prop_conc_lb_gal",
        "value_expr": "row['totalProppantByPerfLength']/row['totalFluidByPerfLength']"
    }
    ]
}

# Offset PDP Wells

When running inventory predictions, you can choose whether to include offset PDP wells based on your analysis goals. For example, include them to account for existing well effects (e.g. offset child distance), or exclude them to isolate sibling well impacts (e.g. spacing sensitivity analysis).

The system performs a radial search from each inventory well’s surface hole location. Any PDP well with a surface hole location within the specified radius—regardless of depth—will be included. Choose a radius large enough to capture relevant offsets without introducing unnecessary wells and compute load.

# Examples

1. Include offset PDP wells within a 2 mile radius:

"inv": {
  "include_pdps": true,
  "max_nearby_pdp_distance_miles": 2,
  ...
  ...
}

2. Exclude all PDP wells:

"inv": {
  "include_pdps": false,
  ...
  ...
}

3. Custom group of offset PDP wells (Special case):

In some cases, you may want to include or exclude specific PDP wells beyond what a simple radius allows. For these scenarios, contact PetroAI Support for help with custom configuration.

"inv": {
  "include_pdps": true,
  "valid_pdps_group_name": "PDP_offset_INV_v1.2.7.0",
  ...
  ...
}