---
title: Well Test Calibration
slug: well-test-calibration
docTags: 
createdAt: 2026-07-03T02:22:30.512Z
---

Well Test Calibration is a three-stage workflow that reconciles well test measurements with physics-based well models. The result is a set of validated, calibrated parameters that feed into production analysis, optimization, and downstream allocation.

# Why It Matters

When a well test is performed, the measured surface rates and pressures need to be reconciled with the well's physics model to derive accurate bottomhole conditions, productivity indices, and performance curves. Without this calibration, daily production estimates use unvalidated model parameters that may drift from actual well behavior over time.

Well Test Calibration ensures that:

- **Daily production calculations** use calibrated VLP factors and reservoir pressure matched to recent well tests
- **Gas lift optimization** has accurate performance curves at multiple tubing header pressures
- **Productivity indices** are tracked over time with calibrated values tied to actual well tests
- **Allocations** can be validated against model-derived rates

**The Three-Stage Pipeline**

```none
Well Test  →  [1. Well Test Validation]  →  [2. Nodal Calibration]  →  [3. Rate Table Validation]
```

Each stage produces a result that can be **Valid**, **Needs Review**, **Rejected**, or **Unreviewed**. Only a **Valid** result in each stage triggers the next stage. The pipeline is designed to be largely automatic, with engineer review required only when the physics or data quality warrants it.

***

# Stage 1: Well Test Validation

Takes a well test from the source system and creates a standardized record that the calibration pipeline can work with.

**What it processes:** Only tests of type `WELLTEST` that are marked valid by the source system, within the last 60 days. Tests outside this window or marked invalid by the source are not processed automatically.

**What it captures:** Oil, water, and gas rates; tubing and casing pressures and temperatures; downhole gauge pressure; gas lift injection rate; and test duration. From these, it computes total gas rate (formation gas + lift gas), total gas-oil ratio, and water cut.

**Missing well test data:** Well test fields are all optional in the source system. If a critical field such as tubing pressure is missing from the well test record, the system will attempt to substitute the value from the nearest daily production data (allocated rates or averaged sensor values for that day). This fallback is rare but ensures the pipeline can continue when source data is incomplete.

## Auto-Validation

The `UseSourceValidation` setting controls whether the system trusts the source validity flag:

- **Enabled (default):** The source system's validity flag is taken at face value. Any test the source marks valid is immediately stamped **Valid** and flows to nodal calibration without engineer review.
- **Disabled:** Every well test enters as **Needs Review** regardless of what the source says. Engineers must manually promote each result to **Valid** to trigger downstream processing. Use this when your source system's validity flag is unreliable or when a stricter review workflow is required.

## When a Well Test Changes After Initial Processing

Source systems occasionally correct well test data after it has already been processed — a revised rate, a corrected pressure, or an updated test date. The system detects these changes on every scheduled calculation and re-processes accordingly:

1. The validation result is updated with the new measurements and a note is appended: *"Source well test changed after initial processing"*
2. The status is re-set per the `UseSourceValidation` setting (immediately **Valid**, or back to **Needs Review**)
3. Nodal calibration re-computes using the updated data
4. The rate table re-generates
5. Daily production calculations update

**Note:** If a well test was previously user-set to **Rejected** and the source data subsequently changes, the updated source data takes precedence and the status will be re-set. The intent is that a data correction from the source represents genuinely new information.

## When a Well Test Becomes Invalid

If the source system marks a previously-valid test as invalid, all three downstream results — well test validation, nodal calibration, and rate table — are immediately marked **Rejected** on the next scheduled calculation. A note is appended to each: *"Well test became invalid after creation"*.

***

# Stage 2: Nodal Calibration

Reconciles the well test measurements with the physics model by calibrating VLP (Vertical Lift Performance) parameters so that the model's calculated bottomhole pressure matches actual measured conditions at the well test date. The output parameters are then applied to daily production calculations going forward.

**What it calibrates:**

- **VLP Correlation:** The flow correlation used for the wellbore traverse
- **Friction Factor (FF):** A multiplier on the friction component of the pressure traverse. Values above 1.0 indicate more friction than the base model (scale, deposits, rough tubing); below 1.0 less friction.
- **Gravity Factor (GF):** A multiplier on the hydrostatic/gravity component of the pressure traverse. Adjusts for fluid density effects not captured by the base PVT.
- **Reservoir Pressure:** Used to derive the IPR and compute productivity index at the well test conditions.

## Parameter Inheritance

When creating or updating a nodal calibration, parameters follow a defined inheritance chain so there is always a physically reasonable starting point:

| Parameter                                | Priority 1      | Priority 2             | Priority 3                 |
| ---------------------------------------- | --------------- | ---------------------- | -------------------------- |
| Correlation                              | Existing result | Last valid calibration | Default from BHP Settings  |
| Reservoir Pressure                       | Existing result | Last valid calibration | Initial formation pressure |
| FF / GF (no gauge, or auto-cal disabled) | Existing result | Last valid calibration | 1.0                        |

If the existing result is already **Valid**, none of its tuning parameters are changed — only the computed outputs (PI, BHP error) are recalculated against the new well test data. This preserves the engineer's previously accepted calibration.

## Auto-Calibration: FF and GF Tuning

When `EnableAutoCalibrationAndValidation` is on and the well test has a valid downhole gauge reading, the system automatically tunes FF and GF to minimize the difference between the calculated and measured bottomhole pressure at gauge depth.

**A gauge reading is considered valid if it is between atmospheric pressure (\~14.7 psia) and 10,000 psia.** Readings outside this range are treated as absent.

**The tuning is sequential — FF first, then GF:**

**Step 1 — Solve Friction Factor:**

- GF is held at 1.0
- Binary search within the configured FF bounds (default: 0.7 to 1.5)
- Each trial FF value runs a full VLP traverse to gauge depth and compares calculated vs. measured pressure
- Converges over up to 30 iterations
- If no exact root exists within the bounds (i.e., both endpoints produce error of the same sign), the bound with the smaller absolute error is selected

**Step 2 — Fine-tune Gravity Factor:**

- FF is now fixed at its solved value
- Binary search within the configured GF bounds (default: 0.9 to 1.1)
- Same convergence approach, up to 30 iterations

**Why sequential:** Friction is typically the dominant error source in gas lift VLP tubing calculations. Solving FF first establishes the baseline flow behavior, then GF fine-tunes the hydrostatic component. This is more numerically stable than solving both simultaneously.

**No valid gauge:** FF and GF are not tuned. They are inherited from the prior calibration or default to 1.0. The nodal calibration is still created and PI is still computed — it just can't report a gauge pressure error.

### Auto-Validation Gates

When auto-calibration is enabled, the system checks two conditions after tuning. **Both must pass** for the result to be automatically marked **Valid**:

1. **PI Change Threshold:** The liquid productivity index must not change by more than the configured threshold compared to the most recent prior valid calibration. Can be configured as an absolute change (STB/d/psia for oil wells, Mscf/d/psia for gas wells) or as a percentage.
2. **VLP Error Threshold:** If a valid gauge exists, the difference between the calculated and measured BHP at gauge depth must be within the configured threshold (default: 10%). If no gauge is present, this condition is skipped and only the PI threshold applies.

The result note will state exactly which thresholds were evaluated and whether they passed or failed, including the measured PI change and gauge error values.

**Cases that always go to Needs Review, regardless of settings:**

- **First-time calibration:** No prior valid calibration exists to compute a PI change against.
- **Last valid calibration is more than 60 days old:** The prior parameters are considered stale. An engineer should review the first calibration back on a well that has been shut in or untested for an extended period.
- **PI could not be computed:** If the combination of rates and pressures does not yield a valid PI (e.g., near-zero drawdown), the result cannot be auto-validated.

## How Calibrated Parameters Apply to Daily Production

Once a nodal calibration result is marked **Valid**, its FF, GF, correlation, and reservoir pressure are applied to every day of daily production from that well test date forward — until a newer valid calibration supersedes them. Days before the first ever valid calibration use the configured model defaults (FF = 1.0, GF = 1.0, configured correlation, initial formation pressure).

This means a single valid calibration from a well test last month is actively shaping today's bottomhole pressure calculations. Keeping calibrations current is important for production accuracy.

## Manual Calibration Workflows

### On-Demand Scenarios (Exploration)

Allows engineers to test "what-if" parameter combinations before committing to an official calibration. Useful when the automatic calibration result needs adjustment or when investigating a suspected change in well condition.

**How it works:**

1. Select a reference well test as the base and comparison well tests to plot.
2. Define one or more scenarios, each with a specific combination of correlation, FF, GF, and/or reservoir pressure. Any unspecified parameters are tuned automatically if a gauge is available, or inherited from the prior calibration.
3. Submit — each scenario calculates independently and in parallel

**What you get per scenario:**

- Wellbore pressure/temperature traverse
- IPR and VLP curves
- Gas lift performance curve
- Calculated PI and gauge pressure error (if gauge exists)
- **Well test diagnostics:** BHP calculations for the reference test plus any selected historical comparison tests, all using the same scenario parameters. This reveals whether the parameter set produces physically reasonable results across multiple tests, not just the one being calibrated.

### Committing a Scenario

After exploring scenarios, commit the best-performing set of parameters as the official nodal calibration. The system marks it **Valid**, generates rate tables, and recalculates the well. This bridges the exploration workflow into the production pipeline.

## Non-Well-Test Calibrations

These calibration types set reservoir pressure and pressure datum directly from measured data, without requiring a full well test. They are immediately marked **Valid** and applied to daily production calculations. They do not generate rate tables.

### Gauge-Based

Uses a measured downhole gauge pressure along with a specified reservoir pressure, pressure datum depth, and shut-in duration. Applicable when a static or flowing gauge measurement is available outside of a formal well test.

### Fluid Level

Uses a measured liquid level depth along with reservoir pressure, pressure datum depth, and a liquid level gradient. Typically applicable to rod pump or plunger lift wells where fluid level is monitored.

***

# Stage 3: Rate Table Validation

Generates well performance curves at three wellhead pressures using the accepted nodal calibration parameters. These curves are used for optimization and allocation — they define the relationship between the control variable (gas lift injection rate, ESP frequency, ESP intake, etc.) and well's production rate at different backpressure conditions.

**Three rate tables, 20 data points each:**

1. **Current wellhead pressure:** At the well test's actual measured tubing pressure. This is always generated.
2. **Lower wellhead pressure:** At a reduced backpressure, representing higher production potential.
3. **Upper wellhead pressure:** At an increased backpressure, representing lower production potential.

The lower and upper THP values are controlled by the `WellheadPressureRangeType` setting:

- **Percentage (default):** Lower and upper are calculated as a percentage above and below the current WHP. Default is 50%, so a well testing at 200 psia WHP would generate curves at 100 and 300 psia.
- **Fixed:** Lower and upper are set to specific absolute psia values, applied to all wells regardless of their actual operating WHP.

**Each rate table point includes:** liquid, oil, and water rates; formation and total gas rates; gas lift injection rate; and incremental GOR (or other parameters for other lift types).

**Current vs. Optimum operating point (current WHP only):**

- **Current:** The actual operating conditions from the well test — active valve depth, injection rate, and if present, the measured gauge pressure.
- **Optimum:** The point on the current WHP performance curve that maximizes liquid rate. This is the theoretically optimal injection rate given the well's current condition.

**Additional data included:** Full wellbore pressure/temperature traverse, IPR curve, VLP curve, and gas lift valve status (depth, state, gas flow rate through valve, valve type, opening/closing pressures).

## When a WHP Sensitivity Fails to Calculate

If the lower or upper WHP causes a physically invalid condition — most commonly, the higher backpressure drives BHP above reservoir pressure resulting in zero or negative drawdown — that curve is skipped. The result is saved with however many tables successfully calculated, and the failed pressures are noted. This is most likely to occur on the upper (higher backpressure) sensitivity for tight or low-pressure wells.

## Auto-Validation

If `EnableAutoValidation` is on (default) and **all three** WHP curves compute successfully, the result is automatically marked **Valid**. If any curve fails, the result goes to **Needs Review** for engineer review, regardless of the auto-validation setting.

***

# Result Statuses

| Status           | Meaning                                      | Used in Daily Calculations? |
| ---------------- | -------------------------------------------- | --------------------------- |
| **Needs Review** | Created or flagged, awaiting engineer review | No                          |
| **Valid**        | Accepted — actively applied                  | Yes                         |
| **Rejected**     | Reviewed and rejected                        | No                          |

Only **Valid** nodal calibrations update daily production parameters. The most recent valid calibration applies to each day until superseded by a newer one.

:::BlockQuote
**Note:** The status table above applies to all three result types (well test validation, nodal calibration, rate table validation). However, only nodal calibration status directly affects daily production calculations. Well test validation and rate table validation statuses control pipeline progression and external use.
:::

***

# Model Settings

Settings can be configured at the well level or the tenant level. Well-level settings take precedence; if no well-level setting exists, the tenant-level setting applies. If neither exists, the defaults below are used.

## Well Test Validation

| Setting               | Default | Description                                                                                                                  |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `UseSourceValidation` | `true`  | When enabled, trusts the source system's validity flag and auto-validates. When disabled, all results enter as Needs Review. |

## Nodal Calibration

| Setting                              | Default           | Description                                                                                                         |
| ------------------------------------ | ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| `EnableAutoCalibrationAndValidation` | `false`           | When enabled, auto-tunes FF/GF (if gauge present) and auto-validates against PI change and VLP error thresholds.    |
| `MinimumVlpFrictionFactor`           | `0.7`             | Lower bound for FF binary search solver                                                                             |
| `MaximumVlpFrictionFactor`           | `1.5`             | Upper bound for FF binary search solver                                                                             |
| `MinimumVlpGravityFactor`            | `0.9`             | Lower bound for GF binary search solver                                                                             |
| `MaximumVlpGravityFactor`            | `1.1`             | Upper bound for GF binary search solver                                                                             |
| `PiChangeThresholdType`              | `RelativePercent` | Whether PI change threshold is absolute (STB/d/psia or Mscf/d/psia) or relative (%)                                 |
| `PiChangeThreshold`                  | `10.0`            | Maximum allowed PI change from the last valid calibration before requiring manual review                            |
| `VlpErrorThreshold`                  | `10.0`            | Maximum allowed BHP calc-to-gauge error (%) before requiring manual review. Only evaluated if a valid gauge exists. |

## Rate Table Validation

| Setting                      | Default      | Description                                                                                       |
| ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------- |
| `WellheadPressureRangeType`  | `Percentage` | Whether sensitivity WHP values are a percentage offset from current WHP, or fixed absolute values |
| `WellheadPressurePercentage` | `50`         | Percentage above and below current WHP for sensitivity curves (Percentage mode only)              |
| `LowerFixedWellheadPressure` | `100 psia`   | Lower WHP for sensitivity curve (Fixed mode only)                                                 |
| `UpperFixedWellheadPressure` | `400 psia`   | Upper WHP for sensitivity curve (Fixed mode only)                                                 |
| `EnableAutoValidation`       | `true`       | Auto-validate if all three WHP curves calculate successfully                                      |

