# Nodal Analysis

## 1. Nodal Analysis Theory

### 1.1. Oil Inflow Performance Relationship (IPR)

The Inflow Performance Relationship (IPR), is a simplified expression that relates the surface rate, $$q_o$$ and the bottomhole flowing pressure, $$p_{wf}$$. The IPR was developed to quickly determine what the well production rate will be if for different backpressures exerted at the wellhead. Alternatively, it is also used to plan wellbore configurations in tandem with choke management strategy to design optimum completion design for practically maximizing production rate from the well.

The straight line IPR states that the rate is directly proportional to the pressure drawdown in the reservoir.
The constant of proportionality here is called the Productivity Index, $$J$$, which is the ratio of producing rate to the pressure drop in the reservoir. This straight line IPR is only used for undersaturated oil reservoirs (and water wells) for well performance calculations and is given as -

where $$p_R$$ is the average pressure in the volume of the reservoir being drained by the well and is used interchangeably with $$\bar{p}$$ here.

For saturated reservoirs (or where the produced fluid is considerably compressible), Vogel (1968) proposed an equation, used traditionally for non-linear IPR seen in these systems as -

where $$q_{o,max}$$, is the maximum oil rate (AOF), when $${p_{wf}}$$ = 0.

For most reservoirs in practice, the reservoir pressure is above the saturation point but with $$p_{wf}$$ below the saturation pressure. For such wells, a composite form of the IPR is used.
Here, the straight line section where $$p_b\leq p_{wf}\leq p_R$$, i.e. the IPR above the bubble point, is represented by -

The non-linear section where $$p_{wf}\le p_b$$, i.e the IPR below the bubble point, is represented using the same productivity index, $$J$$, calculated from the equation above as-

### 1.2. Gas IPR (Reservoir backpressure equation)

• Coming soon in the next release

The Vogel IPR works for most of the cases where the dominant fluid is liquid (i.e. Oil and water) where the rates and pressures tend to be lower unlike gas wells.

Rawlins and Schellhardt from the U.S. Bureau of Mines, from their tests on over 500 gas wells, noted that the difference between the squares of average reservoir pressure and flowing bottomhole pressure (i.e. $$\left(p_R^2 - p_{wf}^2\right)$$ written in shorthand as $$\Delta p^2$$ ) plotted against the corresponding stabilized flow rates from multirate deliverability tests on a log-log plot to produce a straight line.
The slope of this straight line can be used to calculate $$n$$, the deliverability exponent, and hence, $$C$$, the flow coefficient, in the proposed backpressure equation below -

Here, $$n$$ is determined as the inverse slope of the straight line and considers the effect of high-velocity (non-Darcy, turbulent) flows.

Nuances for determining $$n$$ using multirate gas deliverability tests

The multirate tests used to generate the straight line plots in log-log pseudopressure vs rate consists a series of pressure vs rate measurements which may be -

1. Flow-after-flow tests - Producing the well at stabilized flow rates and pressures. Rawlins and Schellhardt used this but it may be practically impossible to test the well long enough to obtain stabilized data for low-permeability gas wells.
2. Isochronal tests - Producing the well at different flow rates with flowing periods of equal duration. Each flow period is separated by a shut-in period long enough to allow the bottomhole pressure to stabilize at the average reservoir pressure (again, not possible in low-permeability reservoirs). Also needs an extended stabilized flow point.
3. Modified isochronal tests - Overcomes the limitation of obtaining stabilized data for low-permeability wells by modifying the isochronal test to require shut in periods longer than or equal to the flow periods separating them. Less accurate compared to isochronal testing.
4. Transient tests - Requires estimates of drainage area and shape, additional reservoir and fluid properties and is hence complex but it eliminates need for stabilized data.

Such high quality multirate test data is rarely available for all the wells so it may be hard to determine the deliverability exponent. It has been shown by Golan and Whitson (1991) and field data from gas wells that the value of n only varies slowly and can be assumed to be roughly constant over the life of the well to simplify calculations and avoid the use of rock and fluid properties to estimate future deliverability.

Once n is calculated, we can calculate $$C$$ by substituting pressure and rate from the straight line in the equation above.
$$n$$ ranges from 0.5 to 1, depending on the flow characteristics -

1. $$n=1$$ for when the flow is characterized by Darcy's equation.
2. $$0.5 \leq n \leq 1$$ for when the flow is characterized by Non-Darcy effects, turbulence.

Gas well performance in terms of pressure-squared, as shown above, is only valid at low reservoir pressures.
At higher pressures, the pressure dependent gas deviation factor and viscosity needs to be taken into account by using gas pseudopressure as a function of pressure, given here as $$p_p(p_{wf})$$ and $$p_p(p_R)$$.

Fetkovich (1973) has also shown that Vogel IPR equation and the Gas IPR equation outlined above are nearly identical for n = 1.
Substituting 1 for n in the Gas IPR equation results in a simplification that is a little more conservative than Vogel's IPR, based on field observations and can be generally applied to saturated oil and gas wells.

whitson+ uses fluid properties from PVT feature and this C&n formulation to automatically compute gas pseudopressure and generate Gas IPR based on the selection of C, the flow coefficient. We use the value of n = 1 as a conservative starting point for construction of the Gas IPR curve with this method.

Non-dimensional form of the backpressure equation using AOF rate,
Comparison with Vogel's Oil IPR, and Infinite-Acting Productivity

This backpressure equation is written in normalized form with AOF rate, squared-pressures to develop the IPR equation for gas wells in dimensionless form as -

We can write the same equation in terms of gas pseudopressures, as:

where, $$p_p(p_{wf})$$ and $$p_p(p_R)$$ can be automatically computed using the fluid properties in the PVT feature in whitson+.

The flow coefficient, $$C$$, is closely related to the Productivity Index, $$J$$, and for high pressure gas $$(p_R>p_{wf}>2500 psia)$$, flow coefficient, $$C$$ if computed from $$\Delta p$$ instead of $$\Delta p^2$$, is equivalent to J or single-phase Oil IPR. Likewise, $$J$$ in Vogel's equation, used in the pressure-squared form, as suggested by Fetkovich for Oil IPR is equivalent to $$C$$ in backpressure equation.

$$C$$ also has characteristics similar to $$J$$ - They can only be assumed constant or stabilized in true boundary dominated flow. Until this is achieved, both of these parameters are considered infinite-acting or transient, and keep shrinking the IPR envelope towards the origin until stable values of $$C$$ and $$J$$ are achieved in boundary-dominated flow.

On Release Schedules for Gas IPR in whitson+

The current release calculates the liquid IPR by default using Vogel's equation for Productivity Index.

The first version of this future release on Gas IPR will assume n, the deliverability exponent, to be constant and equal to one to improve the simplicity of usage.
This also prevents the user from making costly mistakes involved with the determination of n.
In subsequent versions after that, we will add more utility to this feature by including the analysis of multirate tests for graphically computing n from selected well test data.

Watch this space for more updates!

### 1.3. Oil Productivity Index

The productivity index here, given by $$J$$, is a very useful concept for describing the relative potential of the well.
It combines all of rock and fluid properties, as well as geometrical considerations, into a single constant, thus making it unnecessary to consider these properties individually. Constant $$J$$ implies that the ratio of rate to pressure drop is always the same for varying rates.

Note on Constant Productivity Index, $$J$$ and stable inflow performance

Stable inflow performance and constant $$J$$, in particular, asssumes the condition of pseudosteady state(pss) or boundary dominated flow. Simply stated, pss represents the condition when the entire drainge volume of the well contributes to production.

In high permeability formations, this may happen instantaneously but in low permeability formations, the flow may be infinite acting for years in which case, expecting a stabilized IPR is not practical.

The Vogel IPR in the previous section is computed by first calculating the Productivity Index from the flow test.
If the test is above the bubble point or saturation pressure, the $$J$$ is given as -

If the test is below the bubble point or saturation pressure, the $$J$$ is given as -

Alternatively we can also get $$J$$ from $$kh$$, the perm-thickness product and $$J_D$$, the dimensionless productivity index or Skin, $$s$$ as -

Finally, using the productivity index, the IPR is computed for all $$p_{wf}$$ between $$p_R$$ and 0 -

1. Calculate the oil flow rate at bubble point, qo,b
2. Calculate the maximum oil rate, qo,max: $$\label{eq:qomax} q_{o,max} = q_{o,b} + \frac{Jp_b}{1.8}$$
3. Calculate the oil rate at all flowing bottomhole pressures, pwf $$\label{eq:qo} q_{o} = q_{o,b} + \left(q_{o,max} - q_{o,b}\right)\left( 1 - 0.2\left(\frac{p_{wf}}{p_R}\right) - 0.8\left(\frac{p_{wf}}{p_R}\right)^2 \right)$$

### 1.4. Vertical Lift Performance

The Vertical Lift Performance, VLP (also referred to as Tubing Performance Relationship, TPR) describes the pressure drop associated with lifting the fluid at a given rate through the given wellbore configuration at fixed tubing head pressure or casing head pressure.
The VLP takes into account the following pressure elements at the bottomhole, across the range of possbible production rates, to determine the deliverability of the well in combination with what the reservoir can deliver (i.e. the IPR) -

1. Backpressure exterted at the surface from the choke and wellhead assembly -
2. Hydrostatic pressure due to gravity and the elevation change between the wellhead and the intake to the tubing -
Fluid properties and deviation survey
3. Friction losses, which may include irreversible pressure losses due to viscous drag and slippage -
Current or planned wellbore configuration and rates

For a given wellhead pressure, flow rate, and wellbore configuration, the pressure distribution along the tubing is given by a particular pressure distribution along the wellhead. This can be calculated analytically using approximations for single phase or slightly compressible systems but for multiphase mixtures, there are numerous correlations taking the form of pressure versus distance curves called gradient curves.
Traditionally, the VLP was plotted using tracing paper and graphical gradient curves specific to the flow rate, Gas Liquid Ratio and tubing size like the ones given by Gilbert (1954) who developed experimentally gradient curves for light crudes for varying tubing sizes, oil flow rates and gas/liquid ratios.

More recently due to the increase in compute power, we can use correlations developed based on field data with varying levels of reliability and computational complexity and fluid types to calculate the pressure traverse across the wellbore configuration.

Here we take advantage of the sophisticated BHP calculation and PVT features in whitson+ to calculate the VLP, given a fixed wellhead pressures and wellbore configuration for the well deliverability.

The range of possible liquid rates, $$q_L$$, are discretized based on the IPR, i.e. $$0 \leq q_L \leq q_{o,max}$$ and the flow rate of individual phases is calculated from the $$q_L$$ at each discretization using information from the PVT module as follows -

The VLP is only valid for a specific set of well data.

Changing wellhead pressure, gas/liquid ratio, i.e PVT, or tubing dimensions in wellbore configurations will change the VLP and will require the construction of a new curve.

What if my IPR and VLP intersect in two places?

This is likely for certain multiphase mixtures and configurations. One represents a stable flow condition and the other is an unstable one.
Mathematically, the stable point of natural flow exists when the two performance curves intersect with slopes (derivatives) of opposite sign.
If the two performance relations intersect with slopes at the point of intersection of similar sign, the well is in unstable equilibrium and only a small change in rate may cause the system to change it's state of equilibrium, either killing the well or moving it toward the stable point of natural flow.

## 2. Nodal Analysis in whitson+

Nodal Analysis feature can be accessesed in the Production Data Analysis module as shown below.

### 2.1. Selection of Production Test Date and Creation of IPR

Choose the production test date as shown below. This is used to calculate the Productivity Index, $$J$$, at a point in time from the well production history.
Selection of the desired date here will automatically populate the Production Data section below with pressures and rates from the well's production history on the selected date.

Next, the Productivity Index Data section is automatically populated from the date selection as follows -

1. Liquid rate, GOR and WOR are calculated based on the selected production test date input and the associated rates for that date.
2. BHP is fetched from the Bottomhole Pressure feature
3. Reservoir pressure is fetched from the multiphase flowing material balance feature.
4. Saturation pressure is fetched from the PVT feature.

If the BHP, MFMB or PVT analysis is not done for the well, these fields will be blank but the value must be specified manually for the generation of IPR.
The productivity index is calculated at the liquid rate (oil + water) and the specified pressures using the Vogel IPR as outlined above.

### 2.3. Changing the Wellbore Configuration & Creating VLP

The main intent of this feature is to provide a 'What-if' tool for analyzing different well configurations. The active configuration on the production test date is considered the default or current well configuration and this can be compared against a new wellbore configuration.

1. Use the New Well Configuration section to set the existing and new well configurations and see them side-by-side which helps comparison of input.
2. Fix the Casinghead Pressure and Tubinghead Pressure to a constant for both the configurations to generate VLP specific to this combination of parameters.
3. Once the well configurations are saved, you can choose your favorite BHP correlation to compute the VLP.
4. Click the 'Create VLP' button on the top-left of the page.

This step generates 2 VLP curves - one for each well configuration which represents the deliverability of the well under each configuration.

The difference in these two VLP curves in terms of where they intersect the IPR provides the difference in stable production rates that can be expected from each of the wellbore configurations by reading off of the liquid rates plotted on the x-axis at the point of intersection.

In the example shown in the gif above, we see a 100 STB/D downward revision in production rate if we were to use the highest possible tubing diameter in this well.

### 2.4. Saving Different Cases

In reality, you may have more than 2 wellbore configurations to choose from for a particular well.
You save each new wellbore configuration independently as a case, allowing us to compare all the different wellbore configurations at once.

1. To save a case, click 'Save Case' on the top-right. All the saved cases will appear in a new section below all the input.
2. You can activate the relevant cases in the IPR-VLP plot using the checkbox for each case.

In the example shown in the gif above, we see that the adding gas lift has a more favorable effect compared to changing the tubing configuration in the wellbore.